// MainFrm.cpp : implementation of the CMainFrame class
//

#include "stdafx.h"
#include "Game.h"

#include "MainFrm.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CMainFrame

IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)

BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
	ON_WM_CREATE()
END_MESSAGE_MAP()

static UINT indicators[] =
{
	ID_SEPARATOR,           // status line indicator
	ID_INDICATOR_CAPS,
	ID_INDICATOR_NUM,
	ID_INDICATOR_SCRL,
};


// CMainFrame construction/destruction

CMainFrame::CMainFrame()
{
	// TODO: add member initialization code here
}

CMainFrame::~CMainFrame()
{
}


int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	//if (!m_wndStatusBar.Create(this) ||
	//	!m_wndStatusBar.SetIndicators(indicators,
	//	  sizeof(indicators)/sizeof(UINT)))
	//{
	//	TRACE0("Failed to create status bar\n");
	//	return -1;      // fail to create
	//}

	return 0;
}

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	if( !CFrameWnd::PreCreateWindow(cs) )
		return FALSE;
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	//cs.style = WS_OVERLAPPED  | FWS_ADDTOTITLE
	//	 | WS_THICKFRAME | WS_MAXIMIZEBOX | WS_MAXIMIZE | WS_SYSMENU;
	cs.style = WS_OVERLAPPED | WS_CAPTION|  WS_MINIMIZEBOX |FWS_ADDTOTITLE  | WS_SYSMENU;
	
	int xsize =GetSystemMetrics(SM_CXSCREEN);
	int ysize =GetSystemMetrics(SM_CYSCREEN);
	//kich thuoc man hinh
	cs.cx = 1010;
	cs.cy = 750;
	//vi tri dat man hinh
	cs.x =(xsize-cs.cx )/2;
	cs.y=(ysize-cs.cy)/2;
	//huy nut phong to thu nho
	//cs.style&=~(WS_MAXIMIZEBOX);
	//khong cho thay doi kich thuoc
	//cs.style&=~ WS_THICKFRAME;
	
	return TRUE;
}


// CMainFrame diagnostics

#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
	CFrameWnd::AssertValid();
}

void CMainFrame::Dump(CDumpContext& dc) const
{
	CFrameWnd::Dump(dc);
}

#endif //_DEBUG


// CMainFrame message handlers



